package com.letoken.platform.repo.admin.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.letoken.platform.pub.res.ApiResponse;
import com.letoken.platform.repo.admin.po.Announcement;
import com.letoken.platform.repo.admin.req.config.QueryAnnouncementReq;
import com.letoken.platform.repo.admin.req.config.QueryPidAndLangReq;
import com.letoken.platform.repo.admin.res.config.QueryAnnouncementByIdRes;
import com.letoken.platform.repo.admin.res.config.QueryAnnouncementRes;
import com.letoken.platform.repo.app.res.assets.QueryAnnDetailRes;
import com.letoken.platform.repo.app.res.assets.QueryAnnRes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 系统公告 Mapper 接口
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
public interface AnnouncementMapper extends BaseMapper<Announcement> {

    Page<QueryAnnouncementRes> queryAnnouncementList(@Param("page") Page<QueryAnnouncementRes> page, @Param("req") QueryAnnouncementReq req);

    Page<QueryAnnouncementRes> queryOneLevelAnnouncementList(@Param("page") Page<QueryAnnouncementRes> page, @Param("req") QueryAnnouncementReq req);

    QueryAnnouncementByIdRes queryAnnouncementById(@Param("id") Long id);


    List<QueryAnnRes> queryAssetsList(@Param("language") String language);

    QueryAnnDetailRes queryAssetsDetail(@Param("id") Integer id);

    List<QueryAnnouncementRes> queryTwoLevelAnnouncementList(@Param("pid") Long pid);

    QueryAnnouncementByIdRes queryByPidAndLang(@Param("req") QueryPidAndLangReq req);
}
